<?php
/**
 * Created by PhpStorm.
 * User: W
 * Date: 2018/12/25
 * Time: 15:51
 */

namespace app\sports_admin\model;


use think\Model;
use think\Request;

class Protocol extends Model
{
    protected $table = "protocol";
    protected $pk    = "id";
//    public static function getTextAttr($values)
//    {
//        return htmlspecialchars_decode($values);
//    }
    public static function protocolList($page,$rows,$sort,$sortOrder)
    {
        $adminList = self::page($page)
            ->limit($rows)
            ->order("{$sort}","{$sortOrder}")->select();


        $adminCount = self::count();
        return ['rows'=>$adminList,'total'=>$adminCount];
    }

}